package cn.yunhe.zkclient;

import org.I0Itec.zkclient.ZkClient;
import org.junit.Test;

/**
 * 服务发布者
 * 
 * @author YUNHE
 *
 */
public class Server {
	@Test
	public void publish() throws InterruptedException{
		//创建ZK连接
		ZkClient zk = new ZkClient("172.16.8.118:2181");
		//创建新的持久化节点，同时如果父节点不存在自动创建
		zk.createPersistent("/dubbo/cn.yunhe.order/providers/192.168.10.12:8081",true);
		Thread.sleep(Integer.MAX_VALUE);
	}
}
